package org.zhb.sql.query.core.util;

import java.util.Locale;

import com.mysema.query.sql.codegen.DefaultNamingStrategy;

public class CustomeNamingStrategy extends DefaultNamingStrategy {
	@Override
	public String getClassName(String tableName) {
		if (tableName.length() > 1) {
			// 去掉前缀
			tableName = tableName.substring(2);
			// 表名首字母大写
			return tableName.substring(0, 1).toUpperCase(Locale.ENGLISH) + toCamelCase(tableName.substring(1));
		} else {
			return tableName.toUpperCase(Locale.ENGLISH);
		}
	}
}
